var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(e, c, b) {
    if (status == 0 && e == 0) {
        cm.dispose();
        return
    }(e == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            var d = cm.getInfoQuest(59746);
            if (d.equals("chk1=1")) {
                cm.updateInfoQuest(59746, "chk1=1;chk2=1");
                cm.forceCompleteQuest(59748);
                cm.npc_ChangeController(9400060, "oid=116639", 2564, 574, 1);
                cm.npc_LeaveField("oid=116638")
            } else {
                if (d.isEmpty()) {
                    cm.sendOkSNoESC_Bottom("先去其他地方张贴吧。待会再来看看这里。")
                } else {
                    cm.sendOkSNoESC_Bottom("这里已经张贴好了。去其他地方看看吧。")
                }
            }
            cm.dispose()
        } else {
            cm.dispose()
        }
    }
};